package com.s3.khospitalds.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.s3.khospitalds.entity.Prescription;
import com.s3.khospitalds.entity.PrintBill;
import com.s3.khospitalds.mapper.PatientlistMapper;
import com.s3.khospitalds.mapper.PrescriptionMapper;
import com.s3.khospitalds.service.PrescriptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * @Author: xw
 * @CreateTime: 2025/2/25
 * @Description: 患者药方表
 * @Version: 1.0
 */
@Service
public class PrescriptionServiceImpl extends ServiceImpl<PrescriptionMapper, Prescription> implements PrescriptionService {
    @Autowired
    PrescriptionMapper prescriptionMapper;

    @Override
    public List<Prescription> selectAll() {
        return prescriptionMapper.selectAll();
    }

    @Override
    public List<Prescription> findPrescriptionByPatientNumber(String patientNumber) {
        return prescriptionMapper.findPrescriptionByPatientNumber(patientNumber);
    }

    @Override
    public int deletePrescriptionByNumber(String number) {
        return prescriptionMapper.deletePrescriptionByNumber(number);
    }
}
